<template>
  <div class="inputwrap">
    <input type="text" v-model="msg">
    <button @click="add">{{name}}</button>
  </div>
</template>
<script>
import { test, addmember } from "../api/index";
export default {
  data() {
    return {
      name: "提交",
      msg: ""
    };
  },
  methods: {
    add() {
      let inp = this.msg;
      if (inp) {
        this.bus.$emit("send", inp);
        this.msg = "";
      }else{
          alert('give me a messege bro')
      }
    }
  }
};
</script>
<style scoped>
</style>